Click here to Skip to main content
16,021,181 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
DataTable dt = DAL.ExecStoredProc(DAL.DatabaseName.DB, "storedProc", param); StringBuilder sb = new StringBuilder(); 
sb.Append("<br /><br />"); 
sb.Append("<table border="0" cellpadding="3">"); 
for (int i = 0; i < dt.Rows.Count; i++) 
{     
    sb.Append("<tr><td>");     
    sb.Append(dt.Rows[i]["EMail"].ToString()); //here in this row which data will-
                                       //displaying that data having hyperlink
    sb.Append("</td></tr>"); 
} 
sb.Append("</table>"); 
return sb.ToString();
Posted
Updated 15-Feb-12 23:39pm
v3
Comments
BobJanova 16-Feb-12 5:25am    
"give link in html file table row"
This does not make sense.
Herman<T>.Instance 16-Feb-12 5:41am    
you can use foreach (DataRow row in dt.Rows)
{
row["EMail"] ....
}

1 solution

string.Format("{0}", dt.Rows[i]["EMail"].ToString());
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900